import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

/**
 * 用户表
 */
@Entity("user")
export class User{
    @PrimaryGeneratedColumn({
        comment:"自增主键",
        type:"bigint",
    })
    id:number;

    @Column({
        comment:"邮箱地址",
        type:"varchar",
        length:100,
        nullable:false
    })
    email:string;

    @Column({
        nullable:true,
        length:100,
        comment:"用户名称"
    })
    name:string;

    @Column({
        type:'timestamp',
        comment:"创建时间",
        nullable:true
    })
    create_time:Date;

    @Column({
        type:'timestamp',
        comment:"更新时间",
        nullable:true
    })
    update_time:Date;

    @Column({
        comment:"逻辑删除",
        default:0
    })
    del:number;


}